package com.example.bookstore.mapper;

import com.example.bookstore.entity.Notice;
import com.example.bookstore.form.noticeform.UpdateNoticeForm;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NoticeMapper {

    //新增一条通知
    Integer InsertNotice(Notice notice);

    //编辑一条通知
    Integer UpdateNotice(UpdateNoticeForm updateNoticeForm);

    //删除一条通知
    Integer DeleteNotice(Integer noticeId);

    //精确查询一条通知
    Notice SelectNoticeById(Integer noticeId);

    //通过标题模糊查询公告
    List<Notice> SelectNoticeByTitle(String title);

    //获取当前最新通知
    Notice ShowNewNotice();

    //获取所有通知
    List<Notice> ShowAllNotice();

}